package com.designed.pattern.creational.builder;

/**
 * @author yifei
 * @date 2024/3/28
 **/
public class Engineer {
    private CarBuilder carBuilder;

    public void setCarBuilder(CarBuilder carBuilder){
        this.carBuilder = carBuilder;
    }

    public Car makeCar(String basePlate,String frame,String door){
        carBuilder.buildBasePlate(basePlate);
        carBuilder.buildFrame(frame);
        carBuilder.buildDoor(door);
        return carBuilder.makeCar();
    }
}
